program drived_type

    use, intrinsic :: iso_fortran_env, only: rk => real64
    implicit none

    type car_type
        character(:), allocatable :: name   !! 名字
        integer :: vs                       !! 速度
        real(rk) :: length                  !! 长度
    end type car_type
    type(car_type) :: tesla_model_3         !! 特斯拉Model-3电动车

    tesla_model_3%vs = 10                   !! Fortran访问派生类型成员使用%符号

end program drived_type
